package com.yuan.java.thread.threadNotSafe;

public class Count2 {

    public void count() {
        System.out.println("进入线程");
        int num = 0;
        for (int i = 1; i <= 10; i++) {
            num += i;
        }
        System.out.println(Thread.currentThread().getName() + "-" + num);
        System.out.println("结束线程");
    }
}  